package com.jpatest.demo.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.*;

@Configuration
public class ThreadPoolConfiguration {

    @Bean
    public ExecutorService getThreadPool(){
        ThreadPoolExecutor threadPool = new ThreadPoolExecutor(5,15,200, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(5));
        return threadPool;
    }
}
